package com.morningstar.flow.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;

import java.time.LocalDateTime;

/**
 * mybaits 和 @Builder 有冲突
 *
 * @author Admin
 */
@Setter
@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "flow_instance_time_line")
public class FlowInstanceTimeLine {

    @TableId(value = "time_line_id", type = IdType.ASSIGN_ID)
    private Long timeLineId;

    @TableField("process_instance_id")
    private String processInstanceId;

    @TableField("node_activity_id")
    private String nodeActivityId;

    // TODO 改为字典 或者 枚举
    @TableField("type")
    private String type;

    @TableField("user_id")
    private Long userId;

    @TableField("operate_time")
    private LocalDateTime operateTime;

    @TableField("description")
    private String description;

    /**
     *
     */
    @TableField(exist = false)
    private String nodeName;

    /**
     *
     */
    @TableField(exist = false)
    private String userName;
}
